<div class="clearfix body page">

    <div class="inner">

        <div class="content clearfix">

            <div class="sidenav pull-left">

                <h2>Cipa Travel</h2>

                <?php $this->load->view('cipatravel/sidenav'); ?>

            </div>

            <div class="specialoffer pull-left main-page">

                <h1><?= $page['title'] ?></h1>

                <?php if (isset($page['photo_name'])): ?>
                        <div class="main_image">

                            <?php
                            $h3 = "";
                            $h = 250;
                            switch ($page['ID']) {
                                case 32:
                                    $h3 = "Travel Agency Cipa Travel<br>Sveti Stefan - Montenegro";
                                    $h = 360;
                                    break;

                                case 33:

                                    $h3 = "Teamwork";
                                    $h = 400;
                                    break;

                                default:
                                    $h3 = $page['title'];
                            }
                            ?>

                            <img src="<?= thumb_filename($page['photo_name'], 640, $h, CMS_GALLERY, $page['photo_path']) ?>" alt="<?= $page['title']; ?>" class="img-rounded" />

                            <div class="black black2"> <h3><?= $h3 ?></h3></div>

                        </div>
                        <br>
                    <?php endif; ?>

                <div class="main_content">
                    <?= $page['content'] ?>

                    <?php if (isset($photos[1]['filename'])): ?>
                            <h2>Gallery</h2>

                            <?php
                            unset($photos[0]);
                            $photos = array_values($photos);
                            ?>
                            <ul class="photos clearfix">
                                <?php foreach ($photos as $photo): ?>
                                    <li>
                                        <a rel="prettyPhoto[pp_gal]" href="<?= thumb_filename($photo['filename'], 640, 400, CMS_GALLERY, $photo['gallery_path']) ?>">
                                            <img src="<?= thumb_filename($photo['filename'], 116, 89, CMS_GALLERY, $photo['gallery_path']) ?>"  class="img-rounded"/>
                                        </a>
                                    </li>
                                <?php endforeach; ?>
                            </ul>
                        <?php endif; ?>

                    <?php $this->load->view('cipatravel/files'); ?>

                </div>

            </div>

        </div>

    </div>

    <?php $this->load->view('parts/subscripbe'); ?>

</div>